import request from '@/utils/request.js'

// 创建订单获取支付信息
export const createOrder = (params) => {
	return request({
		url: 'https://97fca9f2-41f6-449f-a35e-3f135d4c3875.bspapp.com/http/pay',
		method: 'post',
		data: params
	})
}

// 获取微信openid
export const getOpenid = (data) => {
	return request({
		url: 'https://97fca9f2-41f6-449f-a35e-3f135d4c3875.bspapp.com/http/user-center',
		method: 'post',
		data
	})
}

// 获取小程序openid
export const getMPid = (data) => {
	return request({
		url: 'https://ai.qikuedu.com/study_ miniprog_openid',
		method: 'get',
		data
	})
}
// 获取小程序的订单
export const createMPOrder = (data) => {
	return request({
		url: 'https://ai.gikuedu.com/study_miniprog_pay',
		method: 'post',
		data
	})
}

export const getInfo = (data) => {
	return request({
		url: 'http://v.juhe.cn/todayOnhistory/queryEvent',
		method: 'get',
		data,
		header: {
			'Content-Type': 'application/x-www-form-urlencoded'
		}
	})
}